package cn.mst.vrs.controller.app.pay;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.mst.vrs.controller.app.pay.vo.PaySuccessReqVO;
import cn.mst.vrs.service.pay.PayService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "WX - 支付相关API")
@RestController
@RequestMapping("/vrs/pay")
public class PayAppController {
    @Resource
    private PayService payService;

    @SaCheckLogin
    @PostMapping("/notify/success")
    @Operation(summary = "支付成功回调")
    public CommonResult<Boolean> paySuccessInvoke(@RequestBody @Valid PaySuccessReqVO reqVO) {
        return CommonResult.success(payService.successInvoke(reqVO));
    }
}
